package com.atguigu.luachangeUTF8;

import java.io.UnsupportedEncodingException;
import java.net.URLEncoder;

public class Zi   {


    public String method(String name){
        String sr = null;
        try {
            sr = URLEncoder.encode(name,"UTF-8");
        } catch (UnsupportedEncodingException e) {
            e.printStackTrace();
        }


        String[] split = sr.split("%");
        StringBuffer str5 = new StringBuffer();
        for (String s : split) {
            str5.append(s);
        }
        String string = str5.toString();


        return string;
    }



}
